package com.sky.dto;

import com.sky.entity.DishFlavor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 菜品 新增菜品 接收数据 dto
 */
@Data
@ApiModel(value = "DishDTO", description = "新增菜品传递数据的模型")
public class DishDTO implements Serializable {

    @ApiModelProperty("主键值")
    private Long id;

    //菜品名称
    @ApiModelProperty(value = "菜品名称", required = true)
    @NotBlank(message = "菜品名称为空")
    private String name;

    //菜品分类id
    @ApiModelProperty(value = "分类id", required = true)
    @NotNull(message = "所属分类id为空")
    private Long categoryId;

    //菜品价格
    @ApiModelProperty(value = "菜品价格", required = true)
    @NotNull(message = "菜品价格为空")
    private BigDecimal price;

    //图片
    @ApiModelProperty(value = "菜品图片url", required = true)
    @NotBlank(message = "菜品图片为空")
    private String image;

    //描述信息
    @ApiModelProperty(value = "描述信息")
    private String description;

    //0 停售 1 起售
    @ApiModelProperty(value = "状态: 0停售 1起售")
    private Integer status;

    //口味
    @ApiModelProperty(value = "口味集合")
    private List<DishFlavor> flavors = new ArrayList<>();

}
